package Chess;

import Run.BishopStrategy;
import Run.KingStrategy;
import Run.KnightStrategy;
import Run.QueenStrategy;
import Run.RookStrategy;
import Run.blackPawnStrategy;

public class blackChessback {
	public void blackchessback(int x,int y,chessPiece nextPiece){
		 if(nextPiece.getChessType()==chessType.blackPawn){
        	 chessPiece piece3 = new chessPiece(x,y, chessType.blackPawn,new blackPawnStrategy());
	         BorderPane.getBlackChessList().add(piece3);
	         BorderPane.reshapeImageView(x,y,piece3);
	         Main.pane.getChildren().addAll(piece3.getImageView());
         }
         else if(nextPiece.getChessType()==chessType.blackRook){
        	 chessPiece piece3 = new chessPiece(Controller.backchessx,Controller.backchessy, chessType.blackRook,new RookStrategy());
	         BorderPane.getBlackChessList().add(piece3);
	         BorderPane.reshapeImageView(Controller.backchessx,Controller.backchessy,piece3);
	         Main.pane.getChildren().addAll(piece3.getImageView());
         }
         else if(nextPiece.getChessType()==chessType.blackKnight){
			 chessPiece piece3 = new chessPiece(Controller.backchessx,Controller.backchessy, chessType.blackKnight,new KnightStrategy());
	         BorderPane.getBlackChessList().add(piece3);
	         BorderPane.reshapeImageView(Controller.backchessx,Controller.backchessy,piece3);
	         Main.pane.getChildren().addAll(piece3.getImageView());
         }
         else if(nextPiece.getChessType()==chessType.blackBishop){
        	 chessPiece piece3 = new chessPiece(Controller.backchessx,Controller.backchessy, chessType.blackBishop,new BishopStrategy());
	         BorderPane.getBlackChessList().add(piece3);
	         BorderPane.reshapeImageView(Controller.backchessx,Controller.backchessy,piece3);
	         Main.pane.getChildren().addAll(piece3.getImageView());
         }
         else if(nextPiece.getChessType()==chessType.blackQueen){
        	 chessPiece piece3 = new chessPiece(Controller.backchessx,Controller.backchessy, chessType.blackQueen,new QueenStrategy());
	         BorderPane.getBlackChessList().add(piece3);
	         BorderPane.reshapeImageView(Controller.backchessx,Controller.backchessy,piece3);
	         Main.pane.getChildren().addAll(piece3.getImageView());
         }
         else if(nextPiece.getChessType()==chessType.blackKing){
        	 chessPiece piece3 = new chessPiece(Controller.backchessx,Controller.backchessy, chessType.blackKing,new KingStrategy());
	         BorderPane.getBlackChessList().add(piece3);
	         BorderPane.reshapeImageView(Controller.backchessx,Controller.backchessy,piece3);
	         Main.pane.getChildren().addAll(piece3.getImageView());
         }
	}
}
